home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / accessibility / nsIAccessibleDocument.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  11KB  |  291 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIAccessibleDocument.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIAccessibleDocument_h__
  6. #define __gen_nsIAccessibleDocument_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17. class nsIAccessible; /* forward declaration */
  18.  
  19. class nsIAccessNode; /* forward declaration */
  20.  
  21. class nsIDOMDocument; /* forward declaration */
  22.  
  23. class nsIDOMNode; /* forward declaration */
  24.  
  25. class nsIDOMWindow; /* forward declaration */
  26.  
  27.  
  28. /* starting interface:    nsIAccessibleDocument */
  29. #define NS_IACCESSIBLEDOCUMENT_IID_STR "8781fc88-355f-4439-881f-6504a0a1ceb6"
  30.  
  31. #define NS_IACCESSIBLEDOCUMENT_IID \
  32.   {0x8781fc88, 0x355f, 0x4439, \
  33.     { 0x88, 0x1f, 0x65, 0x04, 0xa0, 0xa1, 0xce, 0xb6 }}
  34.  
  35. /**
  36.  * An interface for in-process accessibility clients
  37.  * that wish to retrieve information about a document.
  38.  * When accessibility is turned on in Gecko,
  39.  * there is an nsIAccessibleDocument for each document
  40.  * whether it is XUL, HTML or whatever.
  41.  * You can QueryInterface to nsIAccessibleDocument from
  42.  * the nsIAccessible or nsIAccessNode for the root node
  43.  * of a document. You can also get one from 
  44.  * nsIAccessNode::GetAccessibleDocument() or 
  45.  * nsIAccessibleEvent::GetAccessibleDocument()
  46.  *
  47.  * @status UNDER_REVIEW
  48.  */
  49. class NS_NO_VTABLE nsIAccessibleDocument : public nsISupports {
  50.  public: 
  51.  
  52.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IACCESSIBLEDOCUMENT_IID)
  53.  
  54.   /**
  55.    * The URL of the document
  56.    */
  57.   /* readonly attribute AString URL; */
  58.   NS_IMETHOD GetURL(nsAString & aURL) = 0;
  59.  
  60.   /**
  61.    * The title of the document, as specified in the document.
  62.    */
  63.   /* readonly attribute AString title; */
  64.   NS_IMETHOD GetTitle(nsAString & aTitle) = 0;
  65.  
  66.   /**
  67.    * The mime type of the document
  68.    */
  69.   /* readonly attribute AString mimeType; */
  70.   NS_IMETHOD GetMimeType(nsAString & aMimeType) = 0;
  71.  
  72.   /**
  73.    * The doc type of the document, as specified in the document.
  74.    */
  75.   /* readonly attribute AString docType; */
  76.   NS_IMETHOD GetDocType(nsAString & aDocType) = 0;
  77.  
  78.   /**
  79.    * True if the document is live in an editor.
  80.    * False if the document is being displayed but not edited. 
  81.    * If a <div> is contentEditable, then it has its own document, 
  82.    * with isEditable == true.
  83.    */
  84.   /* readonly attribute boolean isEditable; */
  85.   NS_IMETHOD GetIsEditable(PRBool *aIsEditable) = 0;
  86.  
  87.   /**
  88.    * The nsIDOMDocument interface associated with this document.
  89.    */
  90.   /* readonly attribute nsIDOMDocument document; */
  91.   NS_IMETHOD GetDocument(nsIDOMDocument * *aDocument) = 0;
  92.  
  93.   /**
  94.    * The nsIDOMWindow that the document resides in.
  95.    */
  96.   /* readonly attribute nsIDOMWindow window; */
  97.   NS_IMETHOD GetWindow(nsIDOMWindow * *aWindow) = 0;
  98.  
  99.   /* readonly attribute nsIAccessible caretAccessible; */
  100.   NS_IMETHOD GetCaretAccessible(nsIAccessible * *aCaretAccessible) = 0;
  101.  
  102.   /**
  103.    * The namespace for each ID that is handed back.
  104.    */
  105.   /* AString getNameSpaceURIForID (in short nameSpaceID); */
  106.   NS_IMETHOD GetNameSpaceURIForID(PRInt16 nameSpaceID, nsAString & _retval) = 0;
  107.  
  108.   /**
  109.    * The window handle for the OS window the document is being displayed in.
  110.    * For example, in Windows you can static cast it to an HWND.
  111.    */
  112.   /* [noscript] readonly attribute voidPtr windowHandle; */
  113.   NS_IMETHOD GetWindowHandle(void * *aWindowHandle) = 0;
  114.  
  115.   /**
  116.    * Returns the access node cached by this document
  117.    * @param aUniqueID The unique ID used to cache the node.
  118.    *                  This matches up with the uniqueID attribute on
  119.    *                  nsIAccessNode.
  120.    * @return The nsIAccessNode cached for this particular unique ID.
  121.    */
  122.   /* [noscript] nsIAccessNode getCachedAccessNode (in voidPtr aUniqueID); */
  123.   NS_IMETHOD GetCachedAccessNode(void * aUniqueID, nsIAccessNode **_retval) = 0;
  124.  
  125.   /**
  126.    * Returns the first accessible parent of a DOM node.
  127.    * Guaranteed not to return nsnull if the DOM node is in a document.
  128.    * @param aDOMNode The DOM node we need an accessible for.
  129.    * @return An first nsIAccessible found by crawling up the DOM node
  130.    *         to the document root.
  131.    */
  132.   /* nsIAccessible getAccessibleInParentChain (in nsIDOMNode aDOMNode); */
  133.   NS_IMETHOD GetAccessibleInParentChain(nsIDOMNode *aDOMNode, nsIAccessible **_retval) = 0;
  134.  
  135. };
  136.  
  137. /* Use this macro when declaring classes that implement this interface. */
  138. #define NS_DECL_NSIACCESSIBLEDOCUMENT \
  139.   NS_IMETHOD GetURL(nsAString & aURL); \
  140.   NS_IMETHOD GetTitle(nsAString & aTitle); \
  141.   NS_IMETHOD GetMimeType(nsAString & aMimeType); \
  142.   NS_IMETHOD GetDocType(nsAString & aDocType); \
  143.   NS_IMETHOD GetIsEditable(PRBool *aIsEditable); \
  144.   NS_IMETHOD GetDocument(nsIDOMDocument * *aDocument); \
  145.   NS_IMETHOD GetWindow(nsIDOMWindow * *aWindow); \
  146.   NS_IMETHOD GetCaretAccessible(nsIAccessible * *aCaretAccessible); \
  147.   NS_IMETHOD GetNameSpaceURIForID(PRInt16 nameSpaceID, nsAString & _retval); \
  148.   NS_IMETHOD GetWindowHandle(void * *aWindowHandle); \
  149.   NS_IMETHOD GetCachedAccessNode(void * aUniqueID, nsIAccessNode **_retval); \
  150.   NS_IMETHOD GetAccessibleInParentChain(nsIDOMNode *aDOMNode, nsIAccessible **_retval); 
  151.  
  152. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  153. #define NS_FORWARD_NSIACCESSIBLEDOCUMENT(_to) \
  154.   NS_IMETHOD GetURL(nsAString & aURL) { return _to GetURL(aURL); } \
  155.   NS_IMETHOD GetTitle(nsAString & aTitle) { return _to GetTitle(aTitle); } \
  156.   NS_IMETHOD GetMimeType(nsAString & aMimeType) { return _to GetMimeType(aMimeType); } \
  157.   NS_IMETHOD GetDocType(nsAString & aDocType) { return _to GetDocType(aDocType); } \
  158.   NS_IMETHOD GetIsEditable(PRBool *aIsEditable) { return _to GetIsEditable(aIsEditable); } \
  159.   NS_IMETHOD GetDocument(nsIDOMDocument * *aDocument) { return _to GetDocument(aDocument); } \
  160.   NS_IMETHOD GetWindow(nsIDOMWindow * *aWindow) { return _to GetWindow(aWindow); } \
  161.   NS_IMETHOD GetCaretAccessible(nsIAccessible * *aCaretAccessible) { return _to GetCaretAccessible(aCaretAccessible); } \
  162.   NS_IMETHOD GetNameSpaceURIForID(PRInt16 nameSpaceID, nsAString & _retval) { return _to GetNameSpaceURIForID(nameSpaceID, _retval); } \
  163.   NS_IMETHOD GetWindowHandle(void * *aWindowHandle) { return _to GetWindowHandle(aWindowHandle); } \
  164.   NS_IMETHOD GetCachedAccessNode(void * aUniqueID, nsIAccessNode **_retval) { return _to GetCachedAccessNode(aUniqueID, _retval); } \
  165.   NS_IMETHOD GetAccessibleInParentChain(nsIDOMNode *aDOMNode, nsIAccessible **_retval) { return _to GetAccessibleInParentChain(aDOMNode, _retval); } 
  166.  
  167. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  168. #define NS_FORWARD_SAFE_NSIACCESSIBLEDOCUMENT(_to) \
  169.   NS_IMETHOD GetURL(nsAString & aURL) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetURL(aURL); } \
  170.   NS_IMETHOD GetTitle(nsAString & aTitle) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTitle(aTitle); } \
  171.   NS_IMETHOD GetMimeType(nsAString & aMimeType) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetMimeType(aMimeType); } \
  172.   NS_IMETHOD GetDocType(nsAString & aDocType) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDocType(aDocType); } \
  173.   NS_IMETHOD GetIsEditable(PRBool *aIsEditable) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIsEditable(aIsEditable); } \
  174.   NS_IMETHOD GetDocument(nsIDOMDocument * *aDocument) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDocument(aDocument); } \
  175.   NS_IMETHOD GetWindow(nsIDOMWindow * *aWindow) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetWindow(aWindow); } \
  176.   NS_IMETHOD GetCaretAccessible(nsIAccessible * *aCaretAccessible) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCaretAccessible(aCaretAccessible); } \
  177.   NS_IMETHOD GetNameSpaceURIForID(PRInt16 nameSpaceID, nsAString & _retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetNameSpaceURIForID(nameSpaceID, _retval); } \
  178.   NS_IMETHOD GetWindowHandle(void * *aWindowHandle) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetWindowHandle(aWindowHandle); } \
  179.   NS_IMETHOD GetCachedAccessNode(void * aUniqueID, nsIAccessNode **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCachedAccessNode(aUniqueID, _retval); } \
  180.   NS_IMETHOD GetAccessibleInParentChain(nsIDOMNode *aDOMNode, nsIAccessible **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAccessibleInParentChain(aDOMNode, _retval); } 
  181.  
  182. #if 0
  183. /* Use the code below as a template for the implementation class for this interface. */
  184.  
  185. /* Header file */
  186. class nsAccessibleDocument : public nsIAccessibleDocument
  187. {
  188. public:
  189.   NS_DECL_ISUPPORTS
  190.   NS_DECL_NSIACCESSIBLEDOCUMENT
  191.  
  192.   nsAccessibleDocument();
  193.  
  194. private:
  195.   ~nsAccessibleDocument();
  196.  
  197. protected:
  198.   /* additional members */
  199. };
  200.  
  201. /* Implementation file */
  202. NS_IMPL_ISUPPORTS1(nsAccessibleDocument, nsIAccessibleDocument)
  203.  
  204. nsAccessibleDocument::nsAccessibleDocument()
  205. {
  206.   /* member initializers and constructor code */
  207. }
  208.  
  209. nsAccessibleDocument::~nsAccessibleDocument()
  210. {
  211.   /* destructor code */
  212. }
  213.  
  214. /* readonly attribute AString URL; */
  215. NS_IMETHODIMP nsAccessibleDocument::GetURL(nsAString & aURL)
  216. {
  217.     return NS_ERROR_NOT_IMPLEMENTED;
  218. }
  219.  
  220. /* readonly attribute AString title; */
  221. NS_IMETHODIMP nsAccessibleDocument::GetTitle(nsAString & aTitle)
  222. {
  223.     return NS_ERROR_NOT_IMPLEMENTED;
  224. }
  225.  
  226. /* readonly attribute AString mimeType; */
  227. NS_IMETHODIMP nsAccessibleDocument::GetMimeType(nsAString & aMimeType)
  228. {
  229.     return NS_ERROR_NOT_IMPLEMENTED;
  230. }
  231.  
  232. /* readonly attribute AString docType; */
  233. NS_IMETHODIMP nsAccessibleDocument::GetDocType(nsAString & aDocType)
  234. {
  235.     return NS_ERROR_NOT_IMPLEMENTED;
  236. }
  237.  
  238. /* readonly attribute boolean isEditable; */
  239. NS_IMETHODIMP nsAccessibleDocument::GetIsEditable(PRBool *aIsEditable)
  240. {
  241.     return NS_ERROR_NOT_IMPLEMENTED;
  242. }
  243.  
  244. /* readonly attribute nsIDOMDocument document; */
  245. NS_IMETHODIMP nsAccessibleDocument::GetDocument(nsIDOMDocument * *aDocument)
  246. {
  247.     return NS_ERROR_NOT_IMPLEMENTED;
  248. }
  249.  
  250. /* readonly attribute nsIDOMWindow window; */
  251. NS_IMETHODIMP nsAccessibleDocument::GetWindow(nsIDOMWindow * *aWindow)
  252. {
  253.     return NS_ERROR_NOT_IMPLEMENTED;
  254. }
  255.  
  256. /* readonly attribute nsIAccessible caretAccessible; */
  257. NS_IMETHODIMP nsAccessibleDocument::GetCaretAccessible(nsIAccessible * *aCaretAccessible)
  258. {
  259.     return NS_ERROR_NOT_IMPLEMENTED;
  260. }
  261.  
  262. /* AString getNameSpaceURIForID (in short nameSpaceID); */
  263. NS_IMETHODIMP nsAccessibleDocument::GetNameSpaceURIForID(PRInt16 nameSpaceID, nsAString & _retval)
  264. {
  265.     return NS_ERROR_NOT_IMPLEMENTED;
  266. }
  267.  
  268. /* [noscript] readonly attribute voidPtr windowHandle; */
  269. NS_IMETHODIMP nsAccessibleDocument::GetWindowHandle(void * *aWindowHandle)
  270. {
  271.     return NS_ERROR_NOT_IMPLEMENTED;
  272. }
  273.  
  274. /* [noscript] nsIAccessNode getCachedAccessNode (in voidPtr aUniqueID); */
  275. NS_IMETHODIMP nsAccessibleDocument::GetCachedAccessNode(void * aUniqueID, nsIAccessNode **_retval)
  276. {
  277.     return NS_ERROR_NOT_IMPLEMENTED;
  278. }
  279.  
  280. /* nsIAccessible getAccessibleInParentChain (in nsIDOMNode aDOMNode); */
  281. NS_IMETHODIMP nsAccessibleDocument::GetAccessibleInParentChain(nsIDOMNode *aDOMNode, nsIAccessible **_retval)
  282. {
  283.     return NS_ERROR_NOT_IMPLEMENTED;
  284. }
  285.  
  286. /* End of implementation class template. */
  287. #endif
  288.  
  289.  
  290. #endif /* __gen_nsIAccessibleDocument_h__ */
  291.